//
//  Player.h
//  MathMastersAsteroids
//
//  Created by Jordon Phillips on 3/5/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//
//  This is the spaceship that the player controls

#import <Foundation/Foundation.h>
#import "GameObject.h"
#import "Bullet.h";
#import "SoundController.h"


@interface Player : GameObject {
	NSTimer* bulletTimer;//this timer determines the rate at which bullets are fired
	NSTimer *animation;//controls when animations change
	NSMutableArray* bulletList;//this list contains all the bullets that the player owns
	BOOL moving;//flagged if the player is moving around
	int health;//the players health, if it reaches 0 the game is over
	BOOL up;//is true if ship is moving up
	BOOL down;// is true if ship is moving down
	BOOL explode;//is true if ship is exploding
	SoundController *sound;//plays sounds
	BOOL soundToggle;//is true if sound is on
}
@property BOOL moving;
@property int health;
@property BOOL soundToggle;
-(void)initPlayer;
-(void)act:(CGPoint)target:(BOOL)touch;
-(void)createBullet;
-(int)getBulletListSize;
-(Bullet*)getBulletAtIndex:(int)index;
-(void)collideWithAsteroid;
-(void)collideWithNumber;
-(void)animate;
@end
